home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-0015 / flicker / foo.c < prev    next >
C/C++ Source or Header  |  1997-04-16  |  556b  |  37 lines

  1.  
  2. char in[32] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
  3.  ,19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
  4. char out[128];
  5.  
  6. main(argc, argv)
  7. int argc;
  8. char *argv[];
  9. {
  10. int inc, outc;
  11.  
  12. inc = outc = 8;
  13. if (argc > 1)
  14.     inc = atoi(argv[1]);
  15. if (argc > 2)
  16.     outc = atoi(argv[2]);
  17.  
  18. stretch(in, out, inc, outc);
  19. print_chars(out, outc);
  20. }
  21.  
  22. print_chars(buf, count)
  23. char *buf;
  24. int count;
  25. {
  26. int i;
  27.  
  28. for (i=0; i<count; )
  29.     {
  30.     printf("%3d ", buf[i]);
  31.     i++;
  32.     if ((i&7) == 0)
  33.         printf("\n");
  34.     }
  35. printf("\n");
  36. }
  37.